package exam.day32;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        char[] arr = in.next().toCharArray();
        int len = arr.length;
        int newLen = (len - 1) * 2 + 1;

        long ret = 0;
        for(int i = 0; i < len; i++) {
            int x = arr[i] - '0';
            if(i == len - 1) {
                ret += x * Math.pow(10, i);
            } else {
                ret += x * Math.pow(10, i);
                ret += x * Math.pow(10, newLen - i - 1);
            }
        }
//        System.out.println(ret);
        if(isPrime(ret)) {
            System.out.println("prime");
        } else {
            System.out.println("noprime");
        }
    }

    public static boolean isPrime(long a) {
        for(long i = 2; i < a; i++) {
            if(a % i == 0) {
                return false;
            }
        }
        return true;
    }
}
